"""rules_pex"""

module(
    name = "rules_pex",
    version = "0.1.0",
)

bazel_dep(name = "bazel_skylib", version = "1.8.2")
bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "rules_python", version = "1.5.1")
bazel_dep(name = "rules_shell", version = "0.5.1")

bazel_dep(name = "rules_rust_mdbook", version = "0.63.0", dev_dependency = True)
bazel_dep(name = "stardoc", version = "0.8.0", dev_dependency = True, repo_name = "io_bazel_stardoc")

python = use_extension("@rules_python//python/extensions:python.bzl", "python", dev_dependency = True)
python.toolchain(
    configure_coverage_tool = True,
    # Working around a rules_python issue with docker
    # https://github.com/bazelbuild/rules_python/pull/713
    ignore_root_user_error = True,
    is_default = True,
    python_version = "3.11",
)
use_repo(
    python,
    "python_3_11_aarch64-apple-darwin",
    "python_3_11_aarch64-unknown-linux-gnu",
    "python_3_11_x86_64-apple-darwin",
    "python_3_11_x86_64-pc-windows-msvc",
    "python_3_11_x86_64-unknown-linux-gnu",
    python311 = "python_3_11",
)

pex = use_extension("//pex:extensions.bzl", "pex", dev_dependency = True)
pex.toolchain(
    name = "pex_toolchains",
    pex_version = "2.67.3",
    python_version = "3.11",
    scie_jump_version = "0.14.0",
    scie_ptex_version = "1.7.0",
    scie_science_version = "0.15.0",
)
pex.add_fallback_windows_binaries(
    toolchain_name = "pex_toolchains",
)
use_repo(
    pex,
    "pex_toolchains",
)

register_toolchains(
    "@pex_toolchains//:all",
    dev_dependency = True,
)
